﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shared/Site.Master" AutoEventWireup="true"
    CodeBehind="QuanLyNhanVien.aspx.cs" Inherits="Hotel_Admin.QuanLyNhanVien" %>

<%@ Register Assembly="Hotel.Controls" Namespace="Hotel.Controls" TagPrefix="hotel" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="crmcontainer">
        <asp:UpdatePanel runat="server" ID="upInfor" UpdateMode="Conditional">
            <ContentTemplate>
                <table class="crmtable">
                    <tr>
                        <td class="crmcell right">
                            Mã nhân viên
                        </td>
                        <td>
                            <asp:TextBox ID="txtMaNV" runat="server" ReadOnly="true"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="crmcell right">
                            Tên nhân viên
                        </td>
                        <td>
                            <asp:TextBox ID="txtTenNhanVien" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="crmcell right">
                            Chứng minh nhân dân
                        </td>
                        <td>
                            <asp:TextBox ID="txtCMND" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="crmcell right">
                            Ngày sinh
                        </td>
                        <td>
                            <asp:TextBox ID="txtNgaySinh" runat="server" tag="datevn"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="crmcell right">
                            Giới tính
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlGioiTinh" runat="server">
                                <asp:ListItem Value="Nam">Nam</asp:ListItem>
                                <asp:ListItem Value="Nu">Nữ</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="crmcell right">
                            Địa chỉ
                        </td>
                        <td>
                            <asp:TextBox ID="txtDiaChi" runat="server" TextMode="MultiLine" Width="300"> </asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="crmcell right">
                            Chức vụ
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlChucVu" runat="server" Width="160">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="crmcell right">
                            &nbsp;
                        </td>
                        <td>
                            <asp:Button ID="btnFilter" CssClass="btnGui" Text="Lọc" runat="server" OnClick="btnFilter_Click" />
                            <asp:Button ID="btnSave" CssClass="btnGui" Text="Lưu" runat="server" OnClick="btnSave_Click" />
                            <asp:Button ID="btnDelete" CssClass="btnGui" Text="Xóa" runat="server" OnClick="btnDelete_Click" />
                            <asp:Button ID="btnHuy" CssClass="btnGui" Text="Hủy" runat="server" OnClick="btnHuy_Click" />
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:UpdatePanel runat="server" ID="upGird" UpdateMode="Conditional">
            <ContentTemplate>
                <hotel:Grid ID="gvList" runat="server" UseCustomPager="true" OnRowCommand="gvList_RowCommand">
                    <PagerSettings FirstPageText="nhân viên " PageButtonCount="2" />
                    <Columns>
                        <asp:TemplateField HeaderStyle-CssClass="checkbox">
                            <HeaderTemplate>
                                <input id="chkAllTop" title="Chọn hết / Bỏ chọn hết" name="chkAllTop" type="checkbox"
                                    onclick="CheckAllItems(this);" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <input id="Id" runat="server" type="hidden" value='<%# Eval("MaNV") %>' />
                                <input name="listIds" type="checkbox" value='<%# Eval("MaNV") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Mã NV" HeaderStyle-Width="5%">
                            <ItemTemplate>
                                <asp:LinkButton ID="lnkBtnID" runat="server" CommandArgument='<%# Eval("MaNV") %>'
                                    CommandName="EditItem" CssClass="link" Text='<%# Eval("MaNV") %>'></asp:LinkButton>
                            </ItemTemplate>
                            <ItemStyle Font-Bold="True" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Họ tên" HeaderStyle-Width="15%">
                            <ItemTemplate>
                                <%#Eval("HoTen") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="CMND" HeaderText="CMND" HeaderStyle-Width="10%" />
                        <asp:TemplateField HeaderText="Ngày Sinh">
                            <ItemTemplate>
                                <%#Eval ("NgaySinh")
                                %>
                            </ItemTemplate>
                            <ItemStyle Font-Bold="True" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Địa Chỉ">
                            <ItemTemplate>
                                <%#Eval ("DiaChi")
                                %>
                            </ItemTemplate>
                            <ItemStyle Font-Bold="True" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Phái">
                            <ItemTemplate>
                                <%#Eval ("Phai")
                                %>
                            </ItemTemplate>
                            <ItemStyle Font-Bold="True" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Chức vụ">
                            <ItemTemplate>
                                <%#Eval ("CHUC_VU.TenChucVu")
                                %>
                            </ItemTemplate>
                            <ItemStyle Font-Bold="True" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Tùy chọn" HeaderStyle-Width="10%">
                            <ItemTemplate>
                                <asp:LinkButton ID="lnkBtntao" runat="server" CommandArgument='<%# Eval("MaNV") %>' CommandName="Taotaikhoan"
                                    CssClass="link" Text="Tạo tài khoản"> </asp:LinkButton>
                            </ItemTemplate>
                            <ItemStyle Font-Bold="True" />
                        </asp:TemplateField>
                    </Columns>
                </hotel:Grid>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>
